//
//  XFYLocalData+Statistics.m
//  MyRobotApp
//
//  Created by 小肥羊 on 15/10/12.
//  Copyright © 2015年 小肥羊. All rights reserved.
//

#import "XFYLocalData+Statistics.h"

@implementation XFYLocalData (Statistics)

- (NSInteger)messageCount:(NSString *)content
{
    NSString *queryString = @"select count(*) from MessageMemoryTable where MessageMemoryContent = ?";
    FMResultSet *countResult = [self.db executeQuery:queryString,content];
    NSInteger count = 0;
    while ([countResult next]) {
        count = [countResult intForColumn:@"count(*)"];
    }
    return count;
}

@end
